<?php

namespace app\service;

use app\model\Shop as ShopModel;
use think\facade\Db;

class ShopService
{
    private $shopModel;
    private $categoryService;

    public function __construct(){
        $this->shopModel = app()->make(ShopModel::class);
        $this->categoryService = app()->make(CategoryService::class);
    }

    /**
     * 根据卖家id查询店铺详情
     *
     * @param $sellerId
     * @return mixed
     */
    public function queryDetailBySellerId($sellerId)
    {
        $object = $this->shopModel->where('seller_id', $sellerId)->find();
        $data = $object->toArray();
        return $data;
    }
}